
function setCookie(cname, cvalue, exdays) {
    var d = new Date();
    d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
    var expires = "expires=" + d.toUTCString();
    document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
function getCookie(name) {
    var matches = document.cookie.match(new RegExp("(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"));
    return matches ? decodeURIComponent(matches[1]) : undefined;
}

$(document).ready(function () {
    if (!getCookie('cookie-accept') == 1) {
        setTimeout(function () {
            $('#cookie').addClass('open');
            $('#cookei_closet').click(function () {
                $('#cookie').removeClass('open');
                setCookie("cookie-accept", "1", 1);
            })
        }, 2000);
    }
});

$('#modal__box_close_cookie').click(function () {
    $('#cookie').removeClass('open');
})